import request from '@/utils/request'
// -------- 头条 --------

let BASE_ADDRESS = 'doc/top'

//  查询头条列表
export function getTopListApi(params) {
    return request({
        url: `${BASE_ADDRESS}/list`,
        method: "get",
        params
    })
}

//  查询头条详细
export function getTopGetInfoInfoApi(params) {
    return request({
        url: `${BASE_ADDRESS}/getInfo?id=${params}`,
        method: "get",

    })
}

//  修改头条详细
export function getTopEditApi(data) {
    return request({
        url: `${BASE_ADDRESS}/edit`,
        method: "put",
        data
    })
}
//  下架头条
export function getTopUpdateStatusApi(data) {
    return request({
        url: `${BASE_ADDRESS}/updateStatus`,
        method: "put",
        data
    })
}